<include file="./App/Admin/View/Common/header.html"/>
    <!-- Start Main Wrapper -->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Multicuploads/uploadify.css">
    <div id="mws-wrapper">
        <!-- Necessary markup, do not remove -->
        <div id="mws-sidebar-stitch"></div>
        <div id="mws-sidebar-bg"></div>
        
        <!-- Sidebar Wrapper -->
        <div id="mws-sidebar">
        
            <!-- Searchbox -->
            <div id="mws-searchbox" class="mws-inset">
                <form action="http://www.malijuthemeshop.com/themes/mws-admin/1.5/typography.html">
                    <input type="text" class="mws-search-input" />
                    <input type="submit" class="mws-search-submit" />
                </form>
            </div>
            
            <!-- Main Navigation -->
            <div id="mws-navigation">
                <include file="./App/Admin/View/Common/left_nav.html"/>
            </div>            
        </div>
        
        <!-- Main Container Start -->
        <div id="mws-container" class="clearfix">
            <!-- Inner Container Start -->
            <div class="container">
                <div class="mws-panel grid_6">
                    <div class="mws-panel-header">
                        <span>新增商品图片</span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        <form class="mws-form" action="{:U('Multipics/add_doit')}" method="post" enctype="multipart/form-data">
                            <div class="mws-form-inline">
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品号</label>
                                    <div class="mws-form-item">
                                        <input type="text" class="large require" name="goods_id" readonly="readonly" value="{$gid}" id="gid"/>
                                    </div>
                                </div>
                                <div class="mws-form-row bordered">
                                    <label class="mws-form-label">商品图片</label>
                                    <div class="mws-form-item">
                                        <div id="queue"></div>
                                        <input id="file_upload" name="file_upload" type="file" multiple="true">
                                    </div>
                                </div>
                            </div>
                            <!-- <div class="mws-button-row">
                                <input type="submit" value="提交" class="btn btn-danger">
                                <input type="reset" value="重置" class="btn ">
                            </div> -->
                        </form>
                    </div>      
                </div>
            </div>
<script src="__PUBLIC__/Multicuploads/jquery.uploadify.min.js" type="text/javascript"></script>
<script type="text/javascript">
    <?php $timestamp = time();?>
    $(function() {
        $('#file_upload').uploadify({
            //formData用于传递一些数据到后台
            'formData'     : {
                'goods_id' : $('#gid').val(),
            },
            'swf'      : '__PUBLIC__/Multicuploads/uploadify.swf',
            'uploader' : '{:U('Multipics/multiupload')}',
            'method'   : 'post',
            'buttonText':'选择图片',
            'progressData':'percentage',
            'removeCompleted':false,
            'onUploadSuccess' : function(file, data) {
                   
                },
            'onQueueComplete':function(){
                alert('上传成功');
                window.location.href = '{:U('Multipics/index')}';
            }
        });
    });
</script>
<include file="./App/Admin/View/Common/footer.html"/>